# the minimum version of CMake.
cmake_minimum_required(VERSION 3.4.1)
project(AMRDemo)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/config
                    ${NATIVERENDER_ROOT_PATH}/include
                    ${NATIVERENDER_ROOT_PATH}/encoder
                    ${NATIVERENDER_ROOT_PATH}/muxer
                    ${NATIVERENDER_ROOT_PATH}/callback)

add_library(entry SHARED napi_init.cpp
                         config/config.cpp
                         encoder/audio_encoder.cpp
                         muxer/muxer.cpp
                         callback/sample_callback.cpp
                         audioRecorder.cpp
                         )
target_link_libraries(entry PUBLIC libace_napi.z.so libohaudio.so libhilog_ndk.z.so libuv.so)
target_link_libraries(entry PUBLIC libnative_media_codecbase.so)
target_link_libraries(entry PUBLIC libnative_media_avmuxer.so)
target_link_libraries(entry PUBLIC libnative_media_core.so)
target_link_libraries(entry PUBLIC libnative_media_acodec.so )
target_link_libraries(entry PUBLIC libace_napi.z.so
                                   libhilog_ndk.z.so
                                   libnative_window.so
                                   libnative_media_core.so
                                   libnative_media_avdemuxer.so
                                   libnative_media_avsource.so
                                   libnative_media_codecbase.so
                                   libnative_media_acodec.so
                                  )